negotiator.protocol.auction
Class AuctionProtocol

java.lang.Object
  extended by negotiator.protocol.Protocol
      extended by negotiator.protocol.auction.AuctionProtocol
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable
Direct Known Subclasses:
FreeAuctionProtocol, MultiPhaseAuctionProtocol

public class AuctionProtocol
extends Protocol

See Also:
Serialized Form

Field Summary
protected  double ALLOWED_UTILITY_DEVIATION
           
 int gui_nego_time
           
 int non_gui_nego_time
           
 
Fields inherited from class negotiator.protocol.Protocol
domain, negoThread, sessionNr, stopNegotiation, totalSessions, tournamentRunner
 
Constructor Summary
AuctionProtocol(AgentRepItem[] agentRepItems, ProfileRepItem[] profileRepItems, java.util.HashMap<AgentParameterVariable,AgentParamValue>[] agentParams, int tSR)
           
 
Method Summary
protected  void calculateTheoreticalOutcome()
           
protected static AuctionProtocol createSession(Tournament tournament, ProfileRepItem profileCenter, ProfileRepItem profileSeller1, ProfileRepItem profileSeller2)
           
 java.lang.String getName()
           
 NegotiationOutcome getNegotiationOutcome()
           
static java.util.ArrayList<Protocol> getTournamentSessions(Tournament tournament)
           
 void run()
           
protected  AuctionBilateralAtomicNegoSession runNegotiationSession(Agent agentA, Agent agentB, AgentRepItem agentARepItem, AgentRepItem agentBRepItem, java.lang.String agentAname, java.lang.String agentBname, ProfileRepItem profileRepItemA, ProfileRepItem profileRepItemB, UtilitySpace spaceA, UtilitySpace spaceB, java.util.HashMap<AgentParameterVariable,AgentParamValue> agentAparams, java.util.HashMap<AgentParameterVariable,AgentParamValue> agentBparams)
          do test run of negotiation session.
protected  AuctionBilateralAtomicNegoSession runNegotiationSession(AgentRepItem agentARepItem, AgentRepItem agentBRepItem, java.lang.String agentAname, java.lang.String agentBname, ProfileRepItem profileRepItemA, ProfileRepItem profileRepItemB, UtilitySpace spaceA, UtilitySpace spaceB, java.util.HashMap<AgentParameterVariable,AgentParamValue> agentAparams, java.util.HashMap<AgentParameterVariable,AgentParamValue> agentBparams)
           
 
Methods inherited from class negotiator.protocol.Protocol
addNegotiationEventListener, fireBilateralAtomicNegotiationSessionEvent, fireLogMessage, fireNegotiationActionEvent, getAgentName, getAgentParams, getAgentRepItem, getAgentUtilitySpaces, getDomain, getNegotiationEventListeners, getNumberOfAgents, getProfileRepItems, getSessionNumber, getTotalSessions, hashCode, loadAgentsUtilitySpaces, removeNegotiationEventListener, setTournamentRunner, startSession, stopNegotiation, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ALLOWED_UTILITY_DEVIATION

protected final double ALLOWED_UTILITY_DEVIATION
See Also:
Constant Field Values

non_gui_nego_time

public int non_gui_nego_time

gui_nego_time

public int gui_nego_time
Constructor Detail

AuctionProtocol

public AuctionProtocol(AgentRepItem[] agentRepItems,
                       ProfileRepItem[] profileRepItems,
                       java.util.HashMap<AgentParameterVariable,AgentParamValue>[] agentParams,
                       int tSR)
                throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in class Protocol

getNegotiationOutcome

public NegotiationOutcome getNegotiationOutcome()
Specified by:
getNegotiationOutcome in class Protocol

calculateTheoreticalOutcome

protected void calculateTheoreticalOutcome()

run

public void run()

getTournamentSessions

public static java.util.ArrayList<Protocol> getTournamentSessions(Tournament tournament)
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

createSession

protected static AuctionProtocol createSession(Tournament tournament,
                                               ProfileRepItem profileCenter,
                                               ProfileRepItem profileSeller1,
                                               ProfileRepItem profileSeller2)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

runNegotiationSession

protected AuctionBilateralAtomicNegoSession runNegotiationSession(Agent agentA,
                                                                  Agent agentB,
                                                                  AgentRepItem agentARepItem,
                                                                  AgentRepItem agentBRepItem,
                                                                  java.lang.String agentAname,
                                                                  java.lang.String agentBname,
                                                                  ProfileRepItem profileRepItemA,
                                                                  ProfileRepItem profileRepItemB,
                                                                  UtilitySpace spaceA,
                                                                  UtilitySpace spaceB,
                                                                  java.util.HashMap<AgentParameterVariable,AgentParamValue> agentAparams,
                                                                  java.util.HashMap<AgentParameterVariable,AgentParamValue> agentBparams)
                                                           throws java.lang.Exception
do test run of negotiation session. There may be multiple test runs of a single session, for isntance to take the average score. returns the result in the global field "outcome"

Parameters:
nr - is the sessionTestNumber
Throws:
java.lang.Exception

runNegotiationSession

protected AuctionBilateralAtomicNegoSession runNegotiationSession(AgentRepItem agentARepItem,
                                                                  AgentRepItem agentBRepItem,
                                                                  java.lang.String agentAname,
                                                                  java.lang.String agentBname,
                                                                  ProfileRepItem profileRepItemA,
                                                                  ProfileRepItem profileRepItemB,
                                                                  UtilitySpace spaceA,
                                                                  UtilitySpace spaceB,
                                                                  java.util.HashMap<AgentParameterVariable,AgentParamValue> agentAparams,
                                                                  java.util.HashMap<AgentParameterVariable,AgentParamValue> agentBparams)
                                                           throws java.lang.Exception
Throws:
java.lang.Exception